public class Main {
    public static void main(String[] args) {
        Product product1 = new Product(2025,10.16);
        System.out.println(product1.getId()+" "+product1.getPrice());

        Product product2 = (Product) product1.Clone();
        System.out.println(product2.getId()+" "+product2.getPrice());
    }
}

interface Prototype{
    public Object Clone();
}
class Product implements  Prototype{
    private int id;
    private double price;

    public Product() {};

    public Product(int id,double price){
        this.id=id;
        this.price=price;
    }

    public double getId(){
        return  id;
    }

    public double getPrice(){
        return  price;
    }

    @Override
    public Object Clone()
    {
        Product object =new Product();
        object.id = this.id;
        object.price=this.price;

        return object;
    }

}